//
//  TKIMChatUtilProtocol.h
//  TKIM
//
//  Created by liupm on 15/11/26.
//  Copyright © 2015年 liupm. All rights reserved.
//
#import "TKIMFileUpDownProtocol.h"

@protocol TKIMChatUtilProtocol <NSObject>


@optional

/**
 *  @Author lpm, 15-11-26 13:11:02
 *
 *  @brief  下载消息的附件
 *
 *  @param aMessage  实现了文件协议的消息
 *  @param complete 成功回调
 *  @param process  进程回调
 *  @param fail 失败回调
 */
-(BOOL)fetchMessageFile:(id<TKIMFileProtocol>)aMessage complete:(FileUplDownLoadSuccess )complete process:(FileUpDownloadUploading) process fail:(FileUpDownloadUploadFail)fail;


/**
 *  @Author lpm, 15-11-26 13:11:02
 *
 *  @brief  下载消息的附件
 *
 *  @param aMessage  实现了文件协议的消息
 *  @param fileSaveName 文件保存的名字
 *  @param complete 成功回调
 *  @param process  进程回调
 *  @param fail 失败回调
 */
-(BOOL)fetchMessageFile:(id<TKIMFileProtocol>)aMessage fileSaveName:(NSString *)fileSaveName complete:(FileUplDownLoadSuccess )complete process:(FileUpDownloadUploading) process fail:(FileUpDownloadUploadFail)fail;



/**
 *  @Author lpm, 15-11-27 14:11:38
 *
 *  @brief  上传头像
 *
 *  @param image  头像图片
 *  @param complete 成功回调
 *  @param process 进程回调
 *  @param fail失败回调
 */
-(void)uploadUserHeadImage:(UIImage *)image complete:(FileUplDownLoadSuccess )complete process:(FileUpDownloadUploading) process fail:(FileUpDownloadUploadFail)fail;


/**
 *  @Author lpm, 15-11-27 14:11:38
 *
 *  @brief  上传头像
 *
 *  @param image
 *  @param complete
 *  @param process
 *  @param fail
 */
-(void)uploadUserHeadImage:(UIImage *)image uploadUrl:(NSString *)uploadUrl complete:(FileUplDownLoadSuccess )complete process:(FileUpDownloadUploading) process fail:(FileUpDownloadUploadFail)fail;


/**
 *  @Author lpm, 16-05-26 10:05:23
 *
 *  @brief  上传头像
 *
 *  @param image 头像
 *  @param uploadUrl    上传地址
 *  @param spliceUrl 拼接地址
 *  @param complete 完成回调
 *  @param process  上传进程
 *  @param fail 失败
 */
-(void)uploadUserHeadImage:(UIImage *)image uploadUrl:(NSString *)uploadUrl spliceUrl:(NSString *)spliceUrl complete:(FileUplDownLoadSuccess )complete process:(FileUpDownloadUploading) process fail:(FileUpDownloadUploadFail)fail;



/**
 *  @Author lpm, 15-12-02 16:12:22
 *
 *  @brief  发送视频请求
 *
 *  @param userID 被请求的用户ID
 */
-(void)sendVideoRequestTo:(NSString *)userID;


/**
 *  @Author lpm, 15-12-02 16:12:22
 *
 *  @brief  发送语音请求
 *
 *  @param userID 被请求的用户ID
 */
-(void)sendVoiceRequestTo:(NSString *)userID;


/**
 *  @Author lpm, 16-02-22 09:02:09
 *
 *  @brief  获得http请求会话key
 */
-(void)getHttpSessionKey:(TKIMCallBack) callBack;


/**
 *  @Author lpm, 16-02-26 15:02:37
 *
 *  @brief  评分请求
 *
 *  @param userId  用户ID
 *  @param callBack
 */
-(void)sendScoreRequest:(NSString *)userId callBack:(TKIMCallBack) callBack;


/**
 *  @Author lpm, 16-06-17 13:06:27
 *
 *  @brief  清理文件缓存
 */
-(void)cleanCache:(TKIMCallBack) callBack;;


/**
 *  @Author lpm, 15-11-02 13:11:59
 *
 *  @brief  获得缓存文件的地址
 *
 *  @param fileName
 *
 *  @return
 */
-(NSString *)getIMCacheUrl;


/**
 *  @Author lpm, 15-11-27 14:11:38
 *
 *  @brief  上传群组头像
 *
 *  @param image  头像图片
 *  @param complete 成功回调
 *  @param process 进程回调
 *  @param fail失败回调
 */
-(void)uploadGroupAvatarImage:(UIImage *)image group:(TKIMRoom *)group complete:(FileUplDownLoadSuccess )complete process:(FileUpDownloadUploading) process fail:(FileUpDownloadUploadFail)fail;

@end
